import { LOGIN_IN, LOGIN_OUT,CHANGE_AREACODE } from '../types.js';

export const userMutations = {
	// 登录
	[LOGIN_IN]: (state,payload)=> {
		state.store_token = payload.access_token;
		state.store_is_vol = payload.isVol;
		state.store_user_code = payload.userCode;
		state.store_expire_time = payload.expire_time;
		state.store_face_url = payload.faceUrl;
	},
	// 退出登录
	[LOGIN_OUT]: (state,payload)=> {
		state.store_token = '';
		state.store_is_vol = 0;
		state.store_user_code = '';
		state.store_expire_time = 0;
		state.store_face_url  = "";
	},
	[CHANGE_AREACODE]:(state,inform)=> {
		state.store_areaInform = inform
	},
}